package core.address.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import core.address.model.region.Region;
import core.address.model.state.State;
import core.address.model.city.City;
import core.address.model.continent.Continent;
import core.address.model.country.Country;

@Entity
@Table(name="basicaddress")
public class BasicAddress implements Serializable{
	
	private static final long serialVersionUID = -8767337896773261247L;
	private Long uuid;
	private AddressType addresstype ;
	private String addressLine1 ;
	private String addressLine2 ;
	private String phone ;
	private String mobile ;
	private String email;
	private String fax;
	private String homepage;
	private String postalcode;
	private String phonebusiness;
	private String companyname;
	private String firstname;
	private String secondname;
	private String lastname;
	private String title;
	private String city1 ;
	private String state1 ;
	private String country1 ;
	private City city;
	private Region region ;
	private State state ;
	private Country country ;
	private Continent continent ;
	
	@Id
	@GeneratedValue
	@Column(name="uuid")
	public Long getUuid()
	{
		return uuid ;
	}
	@Column(name="addressline1")
	public String getAddressLine1()
	{
		return addressLine1 ;
	}
	@ManyToOne(cascade = CascadeType.ALL)
	public AddressType getAddresstype()
	{
		return addresstype ;
	}
	@Column(name="addressline2")
	public String getAddressLine2()
	{
		return addressLine2 ;
	}
	@Column(name="phone")
	public String getPhone()
	{
		return phone ;
	}
	@Column(name="mobile")
	public String getMobile()
	{
		return mobile ;
	}
	
	@OneToOne(cascade = CascadeType.ALL)
	public City getCity() {
	return this.city;
	}
	 
	public void setCity(City city) {
	this.city = city;
	}
	
	
	@OneToOne(cascade = CascadeType.ALL)
	public State getState()
	{
		return this.state ;
	}
	@OneToOne(cascade = CascadeType.ALL)
	public Country getCountry()
	{
		return this.country ;
	}
	
	public void setState(State state)
	{
		 this.state=state ;
	}
	public void setCountry(Country country)
	{
		this.country=country ;
	}
	
	public void setUuid(Long uuid)
	{
		this.uuid= uuid ;
	}
	
	public void setAddressLine1(String addressLine1)
	{
		this.addressLine1= addressLine1 ;
	}
	
	public void setAddresstype(AddressType addresstype)
	{
		this.addresstype= addresstype ;
	}
	
	public void setAddressLine2(String addressLine2)
	{
		this.addressLine2= addressLine2 ;
	}	
	public void setPhone(String phone)
	{
		this.phone= phone ;
	}
	
	public void setMobile(String mobile)
	{
		this.mobile= mobile ;
	}	
	@Column
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	@Column
	public String getHomepage() {
		return homepage;
	}
	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}	
	@Column
	public String getPostalcode() {
		return postalcode;
	}
	public void setPostalcode(String postalcode) {
		this.postalcode = postalcode;
	}
	@Column
	public String getPhonebusiness() {
		return phonebusiness;
	}
	public void setPhonebusiness(String phonebusiness) {
		this.phonebusiness = phonebusiness;
	}
	@Column
	public String getCompanyname() {
		return companyname;
	}
	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}
	@Column
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	@Column
	public String getSecondname() {
		return secondname;
	}
	public void setSecondname(String secondname) {
		this.secondname = secondname;
	}
	@Column
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	@Column
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	@ManyToOne(cascade = CascadeType.ALL)
	public Region getRegion() {
		return region;
	}
	public void setRegion(Region region) {
		this.region = region;
	}
	@ManyToOne(cascade = CascadeType.ALL)
	public Continent getContinent() {
		return continent;
	}
	public void setContinent(Continent continent) {
		this.continent = continent;
	}
	/**
	 * @return the city1
	 */
	@Column
	public String getCity1() {
		return city1;
	}
	/**
	 * @param city1 the city1 to set
	 */
	public void setCity1(String city1) {
		this.city1 = city1;
	}
	/**
	 * @return the state1
	 */
	@Column
	public String getState1() {
		return state1;
	}
	/**
	 * @param state1 the state1 to set
	 */
	public void setState1(String state1) {
		this.state1 = state1;
	}
	/**
	 * @return the country1
	 */
	@Column
	public String getCountry1() {
		return country1;
	}
	/**
	 * @param country1 the country1 to set
	 */
	public void setCountry1(String country1) {
		this.country1 = country1;
	}
	
}
